name = 'alex li'

def getName():
    global name #声明name为全局变量
    name = 'guojie'
    print(name)

getName()

print(f'name:{name}')